<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>counter</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <style>
        #app {
            width: 350px;
            height: 300px;
            background-color: #eee;
        }

        .numbers {

            display: flex;
            flex-direction: row;
            flex-wrap: wrap;

            .item {
                height: 45px;
                width: 55px;
                background-color: rgb(141, 138, 138);
                border: 1px solid gray;
                margin-left: 10px;
                margin-top: 20px;
                /* margin: 0 auto; */
                line-height: 45px;
                text-align: center;
            }

        }
    </style>
</head>

<body>
    <div id="app">
        <div class="result"><input type="text" v-model="counter"
                style="width: 330px; height: 150px; background-color: white; margin-left: 5px; margin-top: 5px;"></div>
        <div class="numbers">
            <div class="item" @click="counter+=0">0</div>
            <div class="item" @click="counter+=1">1</div>
            <div class="item" @click="counter+=2">2</div>
            <div class="item" @click="counter+=3">3</div>
            <div class="item" @click="counter+=4">4</div>
            <div class="item" @click="counter+=5">5</div>
            <div class="item" @click="counter+=6">6</div>
            <div class="item" @click="counter+=7">7</div>
            <div class="item" @click="counter+=8">8</div>
            <div class="item" @click="counter+=9">9</div>
        </div>
    </div>
</body>
<script>
    const counter = {
        data() {
            return {
                counter: 0
            }
        }
    }
    Vue.createApp(counter).mount('#app')
</script>

</html>